Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index: Allow FileNotFoundError to be handled at the top level #1646

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Sep 25, 2024

Description of proposed changes

The removed error handling is flawed: it assumes that FileNotFoundError can only come from a missing input file (--sequences). The reality is that FileNotFoundError can also come from a missing output directory (--output). The top-level exception handler parses the filepath from the error directly, which is accurate.

Related issue(s)

Fixes #1644

Checklist

  • Automated checks pass (except unrelated docs build)
  • Check if you need to add a changelog message
  • Check if you need to add tests tested locally that this works. I don't think adding a test is necessary in this case
  • Check if you need to update docs

@victorlin victorlin self-assigned this Sep 25, 2024
@victorlin victorlin force-pushed the victorlin/fix-augur-index-FileNotFoundError branch from 6bd9983 to c2a1c64 Compare September 25, 2024 23:56
Copy link
Contributor

@genehack genehack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test would be nice…

@victorlin victorlin changed the title Allow FileNotFoundError to be handled at the top level index: Allow FileNotFoundError to be handled at the top level Sep 26, 2024
The removed error handling is flawed: it assumes that FileNotFoundError
can only come from a missing input file (--sequences). The reality is
that FileNotFoundError can also come from a missing output directory
(--output). The top-level exception handler parses the filepath from the
error directly, which is accurate.
@victorlin victorlin force-pushed the victorlin/fix-augur-index-FileNotFoundError branch from c2a1c64 to 296a6c6 Compare September 26, 2024 23:23
@victorlin victorlin mentioned this pull request Sep 26, 2024
5 tasks
@victorlin
Copy link
Member Author

Updated tests in force-push.

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 71.17%. Comparing base (bf05db8) to head (296a6c6).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
augur/index.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1646      +/-   ##
==========================================
+ Coverage   71.14%   71.17%   +0.03%     
==========================================
  Files          79       79              
  Lines        8273     8268       -5     
  Branches     2010     2010              
==========================================
- Hits         5886     5885       -1     
+ Misses       2099     2095       -4     
  Partials      288      288              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@victorlin victorlin merged commit 18fe343 into master Sep 30, 2024
29 of 30 checks passed
@victorlin victorlin deleted the victorlin/fix-augur-index-FileNotFoundError branch September 30, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Augur index may always report sequence file is missing even if output dir is missing?
2 participants